const state = {
  // 默认主题
  default: `
  --fontColor1:#050505;
  --fontColor2:#f36838;
  --fontColor3:#666;
  --fontColor4:#999;
  --backgroundColor:#fff;
  --labelBackgroundColor1:#42b883;
  --labelBackgroundColor2:#087ea4;
  --labelBackgroundColor3:#07c160;
  --borderStyle:2rpx solid #f36838;
  --listBorderStyle:2rpx solid #f5f5f5;
  --gridBorderStyle:2rpx solid #f36838;`,
  // 夜间主题
  dark: `
  --fontColor1:#fff;
  --fontColor2:#fff;
  --fontColor3:#666;
  --fontColor4:#999;
  --backgroundColor:#000;
  --labelBackgroundColor1:#42b883;
  --labelBackgroundColor2:#087ea4;
  --labelBackgroundColor3:#07c160;
  --borderStyle:2rpx solid #3b3d45;
  --listBorderStyle:2rpx solid #3b3d45;
  --gridBorderStyle:2rpx solid #3b3d45;`,
};
function setTheme(theme) {
  const app = getApp();
  if (theme == 'default') {
    wx.setStorageSync("systemTheme", state.default);
    wx.setStorageSync("systemThemeCode", "default");
    return state.default;
  } else if (theme == 'dark') {
    wx.setStorageSync("systemTheme", state.dark);
    wx.setStorageSync("systemThemeCode", "dark");
    return state.dark;
  }
}
module.exports = {
  setTheme,
};
